import 'package:flutter_app/generated/json/base/json_convert_content.dart';
import 'package:flutter_app/bean/list_problem_type_entity.dart';

ListProblemTypeEntity $ListProblemTypeEntityFromJson(Map<String, dynamic> json) {
	final ListProblemTypeEntity listProblemTypeEntity = ListProblemTypeEntity();
	final String? code = jsonConvert.convert<String>(json['code']);
	if (code != null) {
		listProblemTypeEntity.code = code;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		listProblemTypeEntity.name = name;
	}
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		listProblemTypeEntity.id = id;
	}
	final String? pid = jsonConvert.convert<String>(json['pid']);
	if (pid != null) {
		listProblemTypeEntity.pid = pid;
	}
	final List<ListProblemTypeChildTypeList>? childTypeList = jsonConvert.convertListNotNull<ListProblemTypeChildTypeList>(json['childTypeList']);
	if (childTypeList != null) {
		listProblemTypeEntity.childTypeList = childTypeList;
	}
	return listProblemTypeEntity;
}

Map<String, dynamic> $ListProblemTypeEntityToJson(ListProblemTypeEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['name'] = entity.name;
	data['id'] = entity.id;
	data['pid'] = entity.pid;
	data['childTypeList'] =  entity.childTypeList?.map((v) => v.toJson()).toList();
	return data;
}

ListProblemTypeChildTypeList $ListProblemTypeChildTypeListFromJson(Map<String, dynamic> json) {
	final ListProblemTypeChildTypeList listProblemTypeChildTypeList = ListProblemTypeChildTypeList();
	final String? code = jsonConvert.convert<String>(json['code']);
	if (code != null) {
		listProblemTypeChildTypeList.code = code;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		listProblemTypeChildTypeList.name = name;
	}
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		listProblemTypeChildTypeList.id = id;
	}
	final String? pid = jsonConvert.convert<String>(json['pid']);
	if (pid != null) {
		listProblemTypeChildTypeList.pid = pid;
	}
	return listProblemTypeChildTypeList;
}

Map<String, dynamic> $ListProblemTypeChildTypeListToJson(ListProblemTypeChildTypeList entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['name'] = entity.name;
	data['id'] = entity.id;
	data['pid'] = entity.pid;
	return data;
}